package com.cdm.service;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.cdm.dao.ActivityMapper;
import com.cdm.pojo.Activity;

@Service
public class ActivityService {
	
	@Autowired
	private ActivityMapper activityMapper;
	
	public List<Activity> findAllClassify(Map<String,Object> paramMap){
		return activityMapper.findAllClassify(paramMap);
	}
	
	public Integer findActivityCount(Map<String,Object> paramMap){
		return activityMapper.findActivityCount(paramMap);
	}

	public List<Activity> getByJoiner(Map<String,Object> paramMap){
		return activityMapper.getByJoiner(paramMap);
	}
	
	public Integer findActivityCountByJoiner(Map<String,Object> paramMap){
		return activityMapper.findActivityCountByJoiner(paramMap);
	}
	
	public List<Activity> getByPublisher(Map<String,Object> paramMap){
		return activityMapper.getByPublisher(paramMap);
	}
	
	public Integer findActivityCountByPublisher(Map<String,Object> paramMap){
		return activityMapper.findActivityCountByPublisher(paramMap);
	}
	
	public Boolean addActivity(Map<String,Object> paramMap){
		return activityMapper.addActivity(paramMap) == 1;
	}
	
	public Boolean deleteActivity(int activityId){
		return activityMapper.deleteActivity(activityId) == 1;
	}
	
	public Boolean deleteJoiner(Map<String,Object> paramMap){
		return activityMapper.deleteJoiner(paramMap)==1;
	}
	
	public Boolean addJoiner(Map<String,Object> paramMap){
		return activityMapper.addJoiner(paramMap)==1;
	}
}
